home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / util / misc / phoon21_src.lha / phoonsrc / Libi / mulsi3.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-21  |  204 b   |  16 lines

  1. #include "common.h"
  2.  
  3. SItype
  4. __mulsi3 (a, b)
  5.      SItype a,b;
  6. {
  7.   int neg = (a < 0) != (b < 0);
  8.   SItype res;
  9.  
  10.   if (a < 0) a = -a;
  11.   if (b < 0) b = -b;
  12.   
  13.   res = mulu (a,b);
  14.   return neg ? -res : res;
  15. }
  16.